<?php
/**
 * we can filter the post data here.
 *
 */
Class Request {
    public $_request = array();
    public $_post = array();
    public $_get = array();
    function __construct() {
        // Get request variables
        $this->_request = $_REQUEST;
        $this->_post = $_POST;
        $this->_get = $_GET;
        //unset($_REQUEST);
        //unset($_POST);
        //unset($_GET);
    }
	
    function request($name) {
        return $this->_request[$name];
    }
    
    function post($name = '') {
        if (empty($name)) {
            return $this->_post;
        } else {
            if (isset($this->_post[$name])) {
                return $this->_post[$name];
            } else {
                return false;
            }
        }
    }
    
    function get($name = '') {
        if (empty($name)) {
            return $this->_get;
        } else {
            if (isset($this->_get[$name])) {
                return $this->_get[$name];
            } else {
                return false;
            }
        }
    }
}
?>
